const state = {
    count: 0,
};

const mutations = {
    increment(state) {
        state.count++;
    },
    decrement(state) {
        state.count--;
    },
};

const actions = {
    increment({commit}) {
        commit('increment');
    },
    decrement({commit}) {
        commit('decrement');
    },
};

const getters = {
    count: state => state.count,
};

export default {
    namespaced: true,
    state,
    mutations,
    actions,
    getters,
};
